<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>银行账号</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body>
        <form id="cust_cst_np_bank_team_form">
            <div class="fieldset1 tabel_col tabel_col_s clearFix noBorder">
                <div class="fieldBox col_50">
                    <div class="label">开户银行</div>
                    <div class="field">
                        <span id="bkCdNm" name="bkCdNm"></span>
                    </div>
                </div>
                <div class="fieldBox col_50">
                    <div class="label">开户机构</div>
                    <div class="field">
                         <span id="accOrgNm" name="accOrgNm"></span>
                    </div>
                </div>
                <div class="fieldBox col_50">
                    <div class="label">开户名称</div>
                    <div class="field">
                        <span id="accNm" name="accNm"></span>
                    </div>
                </div>
                <div class="fieldBox col_50">
                    <div class="label">开户行行号</div>
                    <div class="field">
                        <span id="bkNo" name="bkNo"></span>
                    </div>
                </div>
                <div class="fieldBox col_50">
			        <div class="label">银行账号</div>
			          <div class="field">
			             <span id="accNo" name="accNo"></span>
			         </div>
			       </div>
                <div class="fieldBox col_50">
                    <div class="label">账户类型</div>
                    <div class="field">
                         <span id="accTypCdNm" name="accTypCdNm"></span>
                    </div>
                </div>
                <div class="fieldBox col_50" id="div_is_certtypcd_id">
                    <div class="label">开户证件类型</div>
                    <div class="field">
                         <span id="certTypCdNm" name="certTypCdNm"></span>
                    </div>
                </div>
                <div class="fieldBox col_50" id="div_is_certno_id">
                    <div class="label">证件号</div>
                    <div class="field">
                         <span id="certNo" name="certNo"></span>
                    </div>
                </div>
                <div class="fieldBox col_50" id="div_is_deductnm_id">
                    <div class="label">是否代扣卡</div>
                    <div class="field">
                         <span id="isDeductNm" name="isDeductNm"></span>
                    </div>
                </div>
                <!-- <div class="fieldBox col_50" id="div_is_def_deductnm_id">
                    <div class="label">是否缺省代扣卡</div>
                    <div class="field">
                         <span id="isDefDeductNm" name="isDefDeductNm"></span>
                    </div>
                </div> -->
                <div class="fieldBox col_50" id="div_is_audstscdnm_id">
                    <div class="label">状态</div>
                    <div class="field">
                         <span id="audStsCdNm" name="audStsCdNm"></span>
                    </div>
                </div>
                <div class="fieldBox col_50" id="div_regwaycdnm_id">
                    <div class="label">帐号来源</div>
                    <div class="field">
                         <span id="regWayCdNm" name="regWayCdNm"></span>
                    </div>
                </div>
                <div class="fieldBox col_50" id="div_signno_id">
                    <div class="label">签约号</div>
                    <div class="field">
                         <span id="signNo" name="signNo"></span>
                    </div>
                </div>
                <div class="fieldBox col_50" id="div_cardtypenm_id">
                    <div class="label">银行卡类型</div>
                    <div class="field">
                         <span id="cardTypeNm" name="cardTypeNm"></span>
                    </div>
                </div>                  
                <!-- hide data -->
		        <div class="fieldBox col_100" style="display:none;">
		          <div class="field">
		              <input name="cbId" id="cbId" type="text" class="ui-textbox" value="${cbId}">
		          </div>
		        </div>
            </div>
        </form>
	<script>
		$(function() {
		   $("#cust_cst_np_bank_team_form").ligerForm({
                validate: true
           });
	        
	       initData();
		});
		
		//父级窗口会调用取消
		frameElement.dialog.onCancel = function () {
			frameElement.dialog.close();
		}
		
		function initData(){
			var cbId = $("#cbId").val();
	    	if(!cbId)return;
	    	var wait_dialog= $.ligerDialog.SQalert({
	            content: LogUtils.LOG_CMM_LOADING,
	            SQ_type: "waitting",
	            onClose: function () {
	            }
	        });

	    	var _url = '<%=path%>/customer/cstbank/getById.do?isEncrypt=1';
	    	$.ajax({
	    		type: 'get',
	    		dataType:'json',
	    		data:{id:cbId},
	    		url: _url,
	    		success:function(msg){
	    			wait_dialog.close();
	    			 if(msg.success == 1){
	    				 setData(msg.data);//设置数据
	    			 }else{
	    				 top.$.ligerDialog.SQalert({content: msg.info,SQ_type: "error"});
	    			 }
	    		}
	    	});
    	}
		
		//设置页面数据
	    function setData(data){
			var audStsCdRem = "";
	    	if(StringUtils.isNotEmpty(data.audStsCdRem)){
	    		audStsCdRem = "("+data.audStsCdRem+")";
        	}
	    	$("#audStsCdNm").html(data.audStsCdNm + audStsCdRem);
	    	$("#isDefDeductNm").html(data.isDefDeductNm);
	    	$("#isDeductNm").html(data.isDeductNm);
	    	$("#certNo").html(data.certNo);
	    	$("#certTypCdNm").html(data.certTypCdNm);
	    	$("#accTypCdNm").html(data.accTypCdNm);
	    	$("#accNo").html(data.accNo);
	    	$("#bkNo").html(data.bkNo);
	    	$("#accNm").html(data.accNm);
	    	$("#accOrgNm").html(data.accOrgNm);
	    	$("#bkCdNm").html(data.bkCdNm);
	    	$("#regWayCdNm").html(data.regWayCdNm);
	    	$("#signNo").html(data.signNo);
	    	$("#cardTypeNm").html(data.cardTypeNm);
		};
	</script>
</body>
</html>